# Update client

Updates an existing client. All fields are optional (partial update). If agencyId is provided, the token must be authorized for it. If parentClientId is provided, it must belong to the same agency as the client being updated.

Endpoint: PUT /v1/clients/{id}
Version: 1.0.0
Security: BearerAuth, ApiKeyAuth

## Path parameters:

  - `id` (integer, required)
    Client identifier.

## Request fields (application/json):

  - `clientName` (string | null)
    Client name (max 255 characters).
    Example: Acme Trucking

  - `agencyId` (integer | null)
    Agency identifier (token must be authorized).

  - `producerId` (integer | null)
    Producer identifier.

  - `parentClientId` (integer | null)
    Parent client ID (must belong to the same agency, token must be authorized).

  - `clientType` (string | null)
    Client type.

  - `dot` (string | null)
    DOT number.

  - `dbaName` (string | null)
    DBA name.

  - `description` (string | null)
    Client description.

  - `userEmail` (string | null)
    User email address.

  - `address1` (string | null)
    Primary address line 1.

  - `state` (string | null)
    Primary state name or code (resolved to stateId).

  - `city` (string | null)
    Primary city name (resolved to cityId, requires state).

  - `zip` (string | null)
    Primary ZIP code (max 20 characters).

  - `mailingAddress1` (string | null)
    Mailing address line 1.

  - `mailingState` (string | null)
    Mailing state name or code (resolved to mailingStateId).

  - `mailingCity` (string | null)
    Mailing city name (resolved to mailingCityId, requires mailingState).

  - `mailingZip` (string | null)
    Mailing ZIP code (max 20 characters).

  - `yearsInBusiness` (integer | null)
    Years in business (non-negative).

  - `taxId` (string | null)
    Tax ID number.

  - `clientAdditionalDetails` (object | null)
    Additional client details.

